import BaseCURDV2Api from '@/framework/infra/base/BaseCURDV2Api'

class OnekeyApi extends BaseCURDV2Api {
  constructor() {
    super('ag/onekey')
  }

  list(params) {
    const getParams = {...params}
    Object.keys(getParams).forEach(key => {
      if (Array.isArray(getParams[key])) {
        getParams[key] = getParams[key].join(',')
      }
    })
    return this.post('list-page', getParams)
  }
}

export const onekeyApi = new OnekeyApi()
